#ifndef _MAIN_WINDOW_H_
#define _MAIN_WINDOW_H_

#include <QtGui/QMainWindow>

#include "TextDB.h"

namespace Ui
{
  class MainWindow;
}

class MainWindow: public QMainWindow
{
  Q_OBJECT
  
  private:
	 Ui::MainWindow* ui;
	 // Database.
	 TextDB* db;
	 QString comment;

  private:
	 void SetActions(void);
	 void ConnectDataBase(QString dbname, bool create);
	 void SetLabelDBName(QString dbname, QString color, QString creation_date);
	 void EnableComponents(bool enabled);

  private slots:
	 void ActionCreate(void);
	 void ActionConnect(void);
	 void ActionDisconnect(void);
	 void ActionExit(void);
	 
	 void ButtonAddPressed(void);
	 void ButtonClearPressed(void);

  public:
	 MainWindow(QWidget* parent = 0);
	 ~MainWindow(void);
};

#endif /* _MAIN_WINDOW_H_ */